package com.crm.customer.controller;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.service.CustomerService;

public class CustomerDeleteController extends HttpServlet{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{
			CustomerService model = new CustomerService();
			String customer_id = req.getParameter("CUSTOMER_ID");
			boolean result = model.deleteCustomer(customer_id);
			if (result) {
				
			req.getRequestDispatcher("/View/CustomerDeleteSuccess.jsp").forward(req, resp);
			}else{
				
				req.getRequestDispatcher("/View/CustomerDeleteFailed.jsp").forward(req, resp);
			} 
				
		}
	}



